/*
 * 版权所有 (C) 2015 知启蒙(ZHIQIM) 保留所有权利。[遇见知启蒙，邂逅框架梦]
 * 
 * https://zhiqim.org/project/zhiqim_framework/zhiqim_httpd.htm
 *
 * Zhiqim Httpd is licensed under Mulan PSL v2.
 * You can use this software according to the terms and conditions of the Mulan PSL v2.
 * You may obtain a copy of Mulan PSL v2 at:
 *          http://license.coscl.org.cn/MulanPSL2
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 * See the Mulan PSL v2 for more details.
 */
package org.zhiqim.httpd.sessioner;

import org.zhiqim.kernel.util.Validates;

/**
 * RMI会话业务属性，为了和远程使用JSON传输，对象转为字符串之后需要保存对象的类名和泛型类名：
 * 1、值为非泛型对象的，只需对象类名即可，如int.class，String.class等
 * 2、值为泛型对象的，如List<Object>的，除了指定类名ArrayList.class，还需指定泛型类名Object.class
 *
 * @version v1.0.0 @author zouzhigang 2020-5-16 新建与整理
 */
public class RmiSessionAttribute
{
    private String key;
    private String value;
    private String cls;
    private String gls;
    
    public String getKey()
    {
        return key;
    }
    public void setKey(String key)
    {
        this.key = key;
    }
    public String getValue()
    {
        return value;
    }
    public void setValue(String value)
    {
        this.value = value;
    }
    public String getCls()
    {
        return cls;
    }
    public void setCls(String cls)
    {
        this.cls = cls;
    }
    public String getGls()
    {
        return gls;
    }
    public void setGls(String gls)
    {
        this.gls = gls;
    }
    
    public boolean hasGenericClass()
    {
        return Validates.isNotEmpty(gls);
    }
}
